package com.learning.servlet3x.async;

import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;
import java.io.IOException;

/**
 * ClassName: AsyncSupportListener
 * Description: 异步监听器
 * Date:  2014/12/06 17:15 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public class AsyncSupportListener implements AsyncListener {

    /**
     * 异步线程开始时
     *
     * @param event
     * @throws IOException
     */
    @Override
    public void onStartAsync(AsyncEvent event) throws IOException {
        System.out.println("异步线程开始时~~~~");
    }

    /**
     * 异步执行完毕时
     *
     * @param event
     * @throws IOException
     */
    @Override
    public void onComplete(AsyncEvent event) throws IOException {
        System.out.println("异步执行完毕时~~~~");
    }

    /**
     * 异步线程执行超时
     *
     * @param event
     * @throws IOException
     */
    @Override
    public void onTimeout(AsyncEvent event) throws IOException {

    }

    /**
     * 异步线程出错时
     *
     * @param event
     * @throws IOException
     */
    @Override
    public void onError(AsyncEvent event) throws IOException {

    }

}
